home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Environments / Clean 1.2.4 / MacInterface / palette.icl < prev    next >
Encoding:
Modula Implementation  |  1994-06-24  |  1.0 KB  |  37 lines  |  [TEXT/3PRM]

  1. implementation module palette;
  2.  
  3. import mac_types;
  4.  
  5. NewPalette :: !Int !Int !Int !Int !Toolbox -> Toolbox;
  6. NewPalette entries srcColors srcUsage srcTolerance t
  7. = code (entries=R4W,srcColors=L,srcUsage=W,srcTolerance=W,t=U)(z=Z){
  8.     instruction 0xAA91
  9. };
  10.  
  11. DisposePalette :: !Int !Toolbox -> Toolbox;
  12. DisposePalette srcPalette t = code (srcPalette=L,t=U)(z=Z){
  13.     instruction 0xAA93
  14. };
  15.  
  16. ActivatePalette :: !WindowPtr !Toolbox -> Toolbox;
  17. ActivatePalette srcWindow t = code (srcWindow=L,t=U)(z=Z){
  18.     instruction 0xAA94
  19. };
  20.  
  21. SetPalette :: !WindowPtr !Int !Bool !Toolbox -> Toolbox;
  22. SetPalette dstWindow srcPalette cUpdates t
  23. = code (dstWindow=L,srcPalette=L,cUpdates=W,t=U)(z=Z){
  24.     instruction 0xAA95
  25. };
  26.  
  27. GetPalette :: !WindowPtr !Toolbox -> (!Int, !Toolbox);
  28. GetPalette srcWindow t = code (srcWindow=R4L,t=U)(palette=L,z=Z){
  29.     instruction 0xAA96
  30. };
  31.     
  32. SetEntryColor :: !Int !Int !(!Int,!Int,!Int) !Toolbox -> Toolbox;
  33. SetEntryColor dstPalette dstEntry (red,green,blue) t
  34. = code (blue=W,green=W,red=W,dstPalette=L,dstEntry=W,t=O6U)(z=I6Z){
  35.     instruction 0xAA9C
  36. };
  37.